package com.gopay.remote.order;

import com.gopay.common.exception.GopayException;

import java.util.List;
import java.util.Map;

/**
 * 更新订单 远程服务
 * 
 * @MainOrderStatusUpdateRemoteService.java
 * @author zhanglei
 * @2013-1-15 下午3:37:55 www.gopay.com.cn Inc.All rights reserved.
 */
public interface MainOrderUpdateRemoteService {
    
    boolean synUpdateOne(String orderId, MainOrderField field, String value) throws GopayException;

    boolean updateOne(String orderId, MainOrderField field, String value) throws GopayException;

    /**
     * 手机钱包 同时更新支付订单和充值订单
     * @param orders
     * @param values
     * @return
     * @throws GopayException
     */
    boolean updateMany(Map<String,String> orders, Map<MainOrderField, String> values) throws GopayException;

    boolean updateMany(String orderId, Map<MainOrderField, String> values) throws GopayException;

    boolean updateManyforScan(String orderId, Map<MainOrderField, String> values) throws GopayException;
    /**
     * 
     * <p>Description: 更新主订单表，增加version校验，
     * 使用范围：钱包交易退款订单生成的定时任务
     * </p>
     * @author 唐阳
     * @date 2016年7月20日 上午10:24:50
     * @version V1.0 
     *
     * @param orderId
     * @param version
     * @param values
     * @return
     * @throws GopayException
     */
    public boolean updateMany(String orderId, String version, Map<MainOrderField, String> values) throws GopayException;
    
    void updateOrderStlmTime(String orderId) throws GopayException;
    
    boolean updateTxnStaCd(String orderId, String newTxnStaCd, List<String> oriTxnStaCd, boolean isExQuery) throws GopayException;

    boolean payUpdate(String orderId, Map<MainOrderField, String> values) throws GopayException;
    /**
     * 更新红包留言
     * @param orderId
     * @param remark2
     * @return
     * @throws GopayException
     */
     boolean updateRemark(String orderId, String remark2) throws GopayException ;
     /**
      * @Description: 更新主订单，更新跨境人民币报盘辅助表邮电费
      * @param orderId
      * @param values
      * @param postFee
      * @return
      * @throws GopayException 
      * @author huangcheng
      */
     boolean updateOrderCbrmb(String orderId, Map<MainOrderField, String> values,String postFee) throws GopayException;

     /**
      * @Description 更新主订单和基金订单状态
      * @Author jianghp
      * @Date 2017/7/12 14:16
      * Copyright (c) 2017. www.gopay.com.cn Inc.All rights reserved.
      */
     boolean updateMainAndFundOrder(String gopayOrderId, Map<MainOrderField, String> values, String orderType) throws GopayException;


}
